"use strict";

angular.module("app").controller("loginCtrl", ["cache", "$state", "$http", "$scope", function(cache, $state, $http, $scope){
	$scope.submit = function(){
		$http.get("data/login.json").then(function(resp){
			cache.put("id", resp.data.id);
			cache.put("name", resp.data.name);
			cache.put("image", resp.data.image);
			$state.go("main");
		});
	};
//	cache.put("abc", "abc");
}]);
